﻿@model Back_end.Models.ApplicationUser

@{
    ViewBag.Title = "编辑";
    var lockedTime = Model.LockoutEndDateUtc > DateTime.UtcNow ?
                        Model.LockoutEndDateUtc.ToString() : "未锁定";
}

<h2>@ViewBag.Title</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>ApplicationUser</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.Id)

        <div class="form-group">
            @Html.LabelFor(model => model.UserName, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.UserName, new { htmlAttributes = new { @class = "form-control" } })
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2">登陆锁定时间</label>
            <div class="col-md-10">
                @lockedTime
                @Html.ActionLink("解锁", "UnLockedDate", "ApplicationUsers", new { Id = Model.Id }, htmlAttributes: new { @class = "btn btn-default"})
                @Html.ActionLink("锁定一天", "LockedAccount", "ApplicationUsers", new { Id = Model.Id, days = 1 }, htmlAttributes: new { @class = "btn btn-default"})
                @Html.ActionLink("锁定五天", "LockedAccount", "ApplicationUsers", new { Id = Model.Id, days = 5 }, htmlAttributes: new { @class = "btn btn-default"})
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("返回列表", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
